<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    var string = 'aaasdfaabcdfff';

    function orderCountInStr(str) {
       /* var arr = str.split('');
        arr.sort();
        var tmp = arr.join('');*/

        return str.split('').sort().join('');
    }

    console.log(orderCountInStr(string));

</script>

</html>
